package cn.java86.test3;

import cn.java86.dao.StudentDao;
import cn.java86.entity.Student;
import cn.java86.util.MybatisUtil;
import org.apache.ibatis.session.SqlSession;

import java.util.List;

/**
 * @author oldliu
 * @since 1.0
 */
public class QueryTestStudent {
    public static void main(String[] args) {
        SqlSession s= MybatisUtil.get();
        StudentDao dao=s.getMapper(StudentDao.class);
        List<Student> list=dao.paging(1,10,"李","1","3",null,null);
        System.out.println("数据如下L:+"+list);
        long total=dao.pageTotal("李","1","3",null,null);
        System.out.println(total);
        MybatisUtil.close(s);
    }
}
